<cfoutput>
	#dspDocumentHeader()#
	<h2>Assessment Form <span class="caption">COMAR 10.21.26.06 B</span></h2>
	<cfif PARAMS.key NEQ 0>#dspFormButtons(key=PARAMS.key, action=PARAMS.controller)#</cfif>
	<fieldset>
		<legend class="title">Assessment</legend>
		<cfset AssessmentColumns = ['Issue','Current Status','Strengths, Needs, Desires <div class="caption">COMAR 10.21.26.06 B(1)</div>','Past Supports/Situations <div class="caption">COMAR 10.21.26 B(2)</div>','Additional Notes']>
		<cfset AssessmentRows = [	<!--- Violent or Assaultive Behavior **Provide detail in Add. Notes --->
				'','Housing Status <div class="caption"><div class="caption">COMAR 10.21.26.06 B(3)(a)(ii)</div>','Activities of Daily Living <div class="caption"><div class="caption">COMAR 10.21.26.06 B(3)(a)(viii)</div>','Legal Status <div class="caption">COMAR 10.21.26.06 B(3)(a)(i)</div>','Current Employment or<br />Economic Support <div class="caption">COMAR 10.21.26.06 B(3)(a)(iii)</div>','Mental Health','Somatic Diagnosis','Substance Abuse <div class="caption">COMAR 10.21.26.06 B(3)(a)(iv)</div>',
				'Physical Abuse <div class="caption">COMAR 10.21.26.06 B(3)(a)(v)</div>','Sexual Abuse <div class="caption">COMAR 10.21.26.06 B(3)(a)(v)</div>','Violent or Assaultive Behavior <div class="caption">COMAR 10.21.26.06 B(3)(a)(vi)','Natural Support System <div class="caption">COMAR 10.21.26.06 B(3)(a)(vii)</div>','Marital History','Religious/Cultural Factors','Interpersonal Skills <div class="caption">COMAR 10.21.26.06 B(3)(a)(ix)</div>'
			]>
		
		<cfset AssessmentBody = [
				{},
				{
					2=["Homeless","With Family","Renting (Room/House/Apt)","Own","Assisted Living","Shelter","Residential Treatment","Halfway House","Other"],
					3=["Return to Previous Housing","Locate New Housing","Situation Desired","Change Current Housing","Situation Desired","Other"],
					4=["With family","Renting (Room/House/Apt)","Own","Assisted Living","Shelter","Residential Treatment","Halfway House","Other"],
					5=["If homeless, how long & reason"] 
				},
				{	
					2=["Able to perform with no assistance","Able to perform with some support","Unable to perform ADL's without support and direction"],
					3=["Maintain current level of ADL functioning","Gain skills for improved ADL functionin","Other"],
					4=["Family","Friends","Treatment Providers","None","Other"],
					5=[""]
				},
				{
					2=["Legal issues","No legal issues","Previous Arrests[Date(s), Offense(s)]"],
					3=["Avoid engagement in legal issues","Remain in contact with PO","Attend Court[Pending court date]","Other"],
					4=["Family/Friends","Parole Officer [PO Name/##]","Probation","Other"],
					5=[""]
				},
				{
					2=["Currently employed (FT/PT)[Company]","Receiving SSI/SSDI[Amount]","Has private health insurance","Has Medicaid/Medicare[Policy ##]","Has Pharmacy Assistance[Policy ##]","Supported by family/friend","No income"],
					3=["Gain employment","Skills/Interests","Apply for SSI/SSDI","Apply for Medicaid/Medicare","Apply for Pharmacy Assistance","Needs no adjustment to financial status","Other"],
					4=["Employment (FT/PT) [Company/type of work,Date last employed]","Received SSI/SSDI","Received Medicaid/Medicare","Received Pharmacy Assistance","Supported by family/friend","Other"],
					5=[""]
				},
				{	
					2=["Hx of mental health diagnosis [DX,Age at DX]","No hx of mental health diagnosis"],
					3=["Understands symptoms and diagnosis","Desires education regarding symptoms","diagnosis and skills for improved symptom management","Desires evaluation or re-evaluation for mental health diagnosis","Denies mental health diagnosis"],
					4=["Currently engaged in mental health treatment/system","Previous involvement in mental health treatment/system but does not remain engaged for any length of time","No hx of involvement in mental health treatment/system"],
					5=["Hx of suicidal/homicidal ideations?[Yes,No, ## of attempts,Date/means]"]
				},
				{ 
					2=["No somatic diagnosis","Current somatic diagnosis[DX,DX]","Requires medication","Requires monitoring (explain)"],
					3=["Understands symptoms and diagnosis","Desires education regarding symptoms","diagnosis and skills for improved symptom management","Desires evaluation or re-evaluation for somatic health diagnosis","No somatic diagnosis"],
					4=["Currently engaged with a medical provider","Barriers limit involvement with a medical provider; does not remain engaged for any length of time","No hx of with a medical provider"],
					5=[""]
				},
				{
					2=["Never engaged in substance use,Current substance use","Hx of Substance Abuse[Drug of Choice,Last Use,Frequency of Use,Period of Use,With whom?]"],
					3=["Avoid engaging in substance use,Seek treatment","Locate a sponsor or other support","No desire to change engagement in substance abuse"],
					4=["Family/Friends","Treatment Program","Halfway House","Sponsor","Other"],
					5=["**List names of treatment programs and dates of attendance in Additional Notes box"] 
				},
				{	
					2=["Current Abuse","HX of Abuse[Perpetrator]","No HX of Abuse"],
					3=["Currently seeking services","Would like to seek service","Remain in supportive relationships","Other"],
					4=["Family/Friends","Law Enforcement","DSS","None","Other"],
					5=[""] 
				},
				{
					2=["Current Abuse","HX of Abuse[Perpetrator]","No HX of Abuse"],
					3=["Currently seeking services","Would like to seek service","Remain in supportive relationships","Other"],
					4=["Family/Friends","Law Enforcement","DSS","None","Other"],
					5=[""] 	
				},
				{
					2=["No current or history of violent behavior","Recent displays of violent behavior (past yr.)","Past displays of violent behavior (more than 1 yr)"],
					3=["Currently practicing adequate anger management skills","Seeking treatment to address violent behavior","Other"],
					4=["Family/Friends","Treatment providers","Personal focus","Other"],
					5=[""]
				},
				{
					2=["Engaged with family","Engaged with friends","Engaged in formal social network (i.e. church, support group, etc)","Engaged with treatment program[Provider Info]","No support"],
					3=["Remain engaged with current support network","Build support system [Who]","Other"],
					4=["Previously engaged with family","Previously engaged with friends","Previously engaged in formal social network (i.e. church, support group, etc)","Previously engaged with treatment program[Provider Info]","Hx of no support","Other"],
					5=["Specify key supports: Name, Age, & Phone"] 
				},
				{	
					2=["Single","Married","Divorced","In a Relationship[Who,When,How Long]"],
					3=["Has children (biological/step/adopted)[## of children,Names/Ages,Who Maintains Custody?]","No Children"],
					4=["Never married","Previous marriages[Who,Who,How Long]"],
					5=[""]	
				},
				{	
					2=["Past religious involvement","Current religious involvement [When/where/how often]","No religious involvement"],
					3=["Remain in contact with religious support","Build relationships with past supports","Develop new relationships","Needs no adjustment to current involvement"],
					4=["Family Name/##","Religious Community Members Name/##","Religious Community Leaders Name/##"],
					5=[""]
				},
				{	
					2=["Able to easily engage with others","Somewhat isolated and difficulty engaging with others","Unable to adequately communicate wants and needs to others"],
					3=["Continue to utilize interpersonal skills for positive gain","Gain interpersonal skills to improve communication and overall function","Other"],
					4=["Family/Friends","Treatment providers","Personal focus","Other"],
					5=[""]
				}
			]>
		
		<cfset columnName = [
				"housingStatus","activitiesOfDailyLiving","legalStatus","currentEmploymentOrEconomicSupport","mentalHealth","somaticDiagnosis","substanceAbuse",
				"physicalAbuse","sexualAbuse","violentOrAssaultiveBehavior","naturalSupportSystem","maritalHistory","religiousFactors","interpersonalSkills"
			]>
		
		<table align="center" class="forms" cellpadding="6">
			<cfloop from="1" to="#ArrayLen(AssessmentRows)#" index="intRow">
				<tr>
					<cfloop from="1" to="#ArrayLen(AssessmentColumns)#" index="intCol">						
						<cfif intRow EQ 1>
							<th class="title">#AssessmentColumns[intCol]#</th>
						<cfelseif intCol EQ 1>
							<td class="center" nowrap="true">#AssessmentRows[intRow]#</td>
						<cfelse>
							<td <cfif intCol EQ 5>valign="middle"<cfelse>valign="top"</cfif>>
								<cfif intCol EQ 5>
									<cfset tmpColumnName = "#columnName[intRow-1]#Comment">
									<dl class="left">
										<!--- Column 4 Items with Subform Items --->
										<cfif Find('[', AssessmentBody[intRow][intCol][1])>
											<cfset tmpAssessment = truncateStringArray(AssessmentBody[intRow][intCol][1])>
											<dt>#tmpAssessment.option#</dt>
											<cfloop array="#tmpAssessment.subOptions#" index="subOption">
												<cfset classStyle = (NOT ListFindNoCase("yes,no", subOption)) ? "left list3" : "left list">
												<cfif subOption IS NOT "No"><dt class="#classStyle#"></cfif>
													<cfif NOT ListFindNoCase("Yes,No", subOption)><span>#subOption#</span><br /></cfif>
													<cfif subOption IS "Yes"><span class="radiobutton"></cfif>
													<cfif ListFindNoCase("Yes,No", subOption)>
														#dspRadioButton("columnName", "validate[required] parentOption", "value", subOption, "assessments")#
													<cfelse>
														<cfset classStyle = "">
														<cfset classStyle &= (subOption CONTAINS "date") ? " date" : "">
														<cfset classStyle &= (subOption CONTAINS "##") ? " small numeric" : "">
														<cfif classStyle IS ""><cfset classStyle &= "normal1"></cfif>
														<input class="#classStyle#" disabled="true" type="text"/>
													</cfif>
													<cfif subOption IS "No"></span></cfif>
												<cfif subOption IS NOT "Yes"></dt></cfif>
											</cfloop>
										<cfelse>
											<dt>#AssessmentBody[intRow][intCol][1]#</dt>
											<dt>#textAreaTag(id="update-assessments-#PARAMS.key#-#tmpColumnName#", name="update[assessments][#PARAMS.key#][#tmpColumnName#]", class="small2", content=document.main[tmpColumnName][1])#</dt>
										</cfif>
									</dl>
								<cfelse>
									<dl class="center" style="width:250px;">
									<cfif intRow LTE 15 AND intCol NEQ 5>
										<cfset columnData = document.main["#columnName[intRow-1]##intCol-1#"]>								
									</cfif>	
									<cfloop from="1" to="#ArrayLen(AssessmentBody[intRow][intCol])#" index="intAssessment">
										<cfset assessmentDetail = AssessmentBody[intRow][intCol][intAssessment]>
										<!--- Items with Subfield Items --->
										<cfif Find('[', assessmentDetail)>
											<cfset assessmentDetail = truncateStringArray(assessmentDetail)>
											<dt class="left" style="margin-left: 0px; margin-top:.5em;margin-bottom:.5em;">
												<cfif intRow LTE 15  AND intCol NEQ 5>
													#dspCheckBox("#columnName[intRow-1]##intCol-1#", assessmentDetail.option, intAssessment, document.main, "assessments", "", "parentOption")#										
												</cfif>										
											</dt>
											<cfloop array="#assessmentDetail.subOptions#" index="subOption">
												<dt class="list left">
													<cfset classStyle = "">
													<cfset classStyle &= (subOption CONTAINS "date") ? " date" : "">
													<cfset classStyle &= (subOption CONTAINS "##") ? " small numeric" : "">
													<cfif classStyle IS ""><cfset classStyle &= "normal1"></cfif>
													<span class="disabled">#subOption#</span><br />
													<input class="#classStyle#" type="text" disabled="disabled" />
												</dt>
											</cfloop>
										<cfelse>
											<!--- Normal Items --->
											<dt style="text-align:left;margin-top:.5em;margin-bottom:.5em;">
												<cfif intRow LTE 15  AND intCol NEQ 5>
													<cfif assessmentDetail IS "Other">														
														<cfsavecontent variable="otherInput">
															<cfset tmpColumnName = "#columnName[intRow-1]##intCol-1#Other">
															<cfset isChecked = (ListLast(document.main["#columnName[intRow-1]##intCol-1#"][1]) EQ 1) ? false : true>
															#textFieldTag(id="update-assessments-#PARAMS.key#-#tmpColumnName#-#intAssessment#", name="update[assessments][#PARAMS.key#][#tmpColumnName#][#intAssessment#]", class="validate[required] normal1 inline", disabled="#isChecked#", value="")#
														</cfsavecontent>
													<cfelse>
														<cfset otherInput = "">	
													</cfif>
													#dspCheckBox("#columnName[intRow-1]##intCol-1#", assessmentDetail, intAssessment, document.main, "assessments", otherInput, "parentOption")#	
												</cfif>										
											</dt>
										</cfif>
									</cfloop>
									</dl>
								</td>
							</cfif>
						</cfif>
					</cfloop>
				</tr>
			</cfloop>
		</table>
	</fieldset>
	
	<fieldset>
		<legend class="title">Potential Aftercare <span class="caption">COMAR 10.21.26.06 B(4)</span></legend>
		<cfset aftercareColumns = ["&nbsp;","Name","Address","Phone"]>
		<cfset aftercareRows = ["","Tentative Discharge Destination","Psychiatric Care/Therapist",'Somatic Care/Care Manager <div class="caption">COMAR 10.21.26.06 D(1)</div>']>
		<cfset aftercareColumnNames = ["","tentativeDischargeDestination","psychiatricCareTherapist","somaticCareManager"]>
		
		<table class="forms" cellpadding="6">
			<cfloop from="1" to="#ArrayLen(AfterCareRows)#" index="intRow">
				<tr>
					<cfloop from="1" to="#ArrayLen(AfterCareColumns)#" index="intCol">
						<cfif intRow EQ 1>
							<th class="title" nowrap="true">#AfterCareColumns[intCol]#</th>
						<cfelseif intCol EQ 1>
							<td class="center" nowrap="true">#AfterCareRows[intRow]#</td>
						<cfelse>
							<td class="left">
								<cfif intCol EQ 2>
									#textFieldTag(id="update-assessments-#PARAMS.key#-#aftercareColumnNames[intCol]#Name", name="update[assessments][#PARAMS.key#][#aftercareColumnNames[intCol]#Name]", class="validate[required] normal2", value=document.main['#aftercareColumnNames[intCol]#Name'][1], maxLength="30")#
								<cfelseif intCol EQ 3>
									#dspAddress(aftercareColumnNames[intCol], "assessments", PARAMS.key, document.main)#
								<cfelse>
									#dspPhoneNumber("assessments", PARAMS.key, "#aftercareColumnNames[intCol]##aftercareColumns[intCol]#", document.main["#aftercareColumnNames[intCol]##aftercareColumns[intCol]#"])#
								</cfif>
							</td>
						</cfif>
					</cfloop>
				</tr>
			</cfloop>
		</table><br />
		
		<table cellpadding="6">
			<tr>
				<td>Completed By:</td>
				<td>#textFieldTag(id="update-assessments-#PARAMS.key#-completedBy", name="update[assessments][#PARAMS.key#][completedBy]", class="validate[required] normal2", value=document.main.completedBy[1], maxLength="30")#</td>
				<td align="right">Date:</td>
				<td>#textFieldTag(id="update-assessments-#PARAMS.key#-completedByDate", name="update[assessments][#PARAMS.key#][completedByDate]", class="validate[required] date", value=document.main.completedByDate[1])#</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td>Reviewed By:</td>
				<td>#textFieldTag(id="update-assessments-#PARAMS.key#-reviewedBy", name="update[assessments][#PARAMS.key#][reviewedBy]", class="validate[required] normal2", value=document.main.reviewedBy[1], maxLength="30")#</td>
				<td align="right">Date:</td>
				<td>#textFieldTag(id="update-assessments-#PARAMS.key#-reviewedByDate", name="update[assessments][#PARAMS.key#][reviewedByDate]", class="validate[required] date", value=document.main.reviewedByDate[1])#</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td>Date of Arrival:</td>
				<td>#textFieldTag(id="update-assessments-#PARAMS.key#-dateOfArrival", name="update[assessments][#PARAMS.key#][dateOfArrival]", class="validate[required] date", value=document.main.dateOfArrival[1])#</td>
				<td align="right">Axis 1 Diagnosis:</td>
				<td>#textFieldTag(id="update-insurances-#PARAMS.key#-axis1", name="update[insurances][#PARAMS.key#][axis1]", class="validate[required]", value=document.insurance.axis1)#</td>
				<td align="right">GAF:</td>
				<td>#textFieldTag(id="update-insurances-#PARAMS.key#-highestGAFinLastYear", name="update[insurances][#PARAMS.key#][highestGAFinLastYear]", class="validate[required] small numeric", value=document.insurance.highestGAFinLastYear, maxLength="3")#</td>
			</tr>
		</table>
	</fieldset>
	<cfif PARAMS.key NEQ 0>#dspFormButtons(key=PARAMS.key, action=PARAMS.controller)#</cfif>
</cfoutput>